﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Security.Cryptography.X509Certificates;
using System.Text;
using System.Threading.Tasks;
using DLLPC.Utilities;

namespace VisionCore
{
    public class LoadRoadHelper
    {
        public List<LoadInfo> TrayRoads { get; set; }

        public List<LoadInfo> LoadRoad(PRM_FixtureInfo panleInfo, PRM_FixtureInfo taryInfo)
        {
            LoadInfoHelper trayPos = new LoadInfoHelper(panleInfo);
            TrayRoads = trayPos.CreateLoadRoad();

            for (int i = 0; i < TrayRoads.Count; i++)
            {
                PRM_FixtureInfo info = taryInfo;
                info.Base = new PointRotation.Point(TrayRoads[i].Info.Base.x- ParameterHelper.SysParam.ULDSTBase.CCDPitch.X, TrayRoads[i].Info.Base.y + ParameterHelper.SysParam.ULDSTBase.CCDPitch.Y);

                LoadInfoHelper diePos = new LoadInfoHelper(info);
                TrayRoads[i].Roads = diePos.CreateLoadRoad();
            }
            return TrayRoads;
        }
    }
}
